package com.njwb.mapper;

import com.njwb.entity.Dept;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Description: 类的描述
 * Author: yuandeyin@itany.com
 * Date: 2025-08-11 15:41
 * Version: 1.0
 */
public class DeptRowMapping implements RowMapping<Dept>{
    @Override
    public Dept mapper(ResultSet rs) throws SQLException {
        //RS 一行部门数据
        Dept dept = new Dept();
        dept.setDeptNo(rs.getInt("deptno"));
        dept.setDname(rs.getString("dname"));
        dept.setDloc(rs.getString("dloc"));
        return dept;
    }
}
